
import Model.Sach;
import Model.Thanhvien;
import dao.SachDAO;
import java.sql.Date;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author Loc Vo
 */
public class Client {

    private SachDAO sach;

    public static void main(String[] args) {
        ApplicationContext ctx =
                new ClassPathXmlApplicationContext("SpringServer.xml");
    }

    public void init() {
//        java.sql.Date sqlDate = new java.sql.Date((new java.util.Date()).getTime());
//        System.out.println(sach.getThanhVien("TV01", SachDAO.DOC_TEN_TV));
//        for (Sach book :sach.getSachBang("TV01", SachDAO.DOC_BANG_TENSACH) ) {
//            System.out.println(book.getTen_sach());
//        }
//        sach.themSach("BOOK4", "CLGT", "AUTHORS3", "TYPE3", "NXB1", sqlDate, 50000, 5);
//        sach.xoaSach("BOOK4");
//        sach.get
    }

    public SachDAO getSach() {
        return sach;
    }

    public void setSach(SachDAO sach) {
        this.sach = sach;
    }
}
